import javax.management.remote.rmi._RMIConnection_Stub;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2023-03-23
 * Time: 23:25
 */
public class test05 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(NumderOf1(n));
    }

    private static int NumderOf1(int n) {
        int count = 0;
        while (n != 0){
            if((n & 1) == 1) {
                count++;
            }
            n = n >> 1;
        }
        return  count;
    }
}
